<%@page import="com.erp.dto.Privilege"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>设置权限页面</title>
<script src="<%=basePath%>script/jquery-ui-1.10.4/jquery-1.10.2.js"></script>
<script src="<%=basePath%>script/jquery-ui-1.10.4/ui/jquery.ui.core.js"></script>
<script src="<%=basePath%>script/jquery-ui-1.10.4/ui/jquery.ui.widget.js"></script>
<script src="<%=basePath%>script/jquery-ui-1.10.4/ui/jquery.ui.button.js"></script>
<script type="text/javascript" src="script/zTree/js/jquery.ztree.core-3.5.js"></script>
<script type="text/javascript" src="script/zTree/js/jquery.ztree.excheck-3.5.js"></script>
<script src="script/script.js"></script>
<link rel="stylesheet" href="<%=basePath%>script/jquery-ui-1.10.4/themes/base/jquery.ui.all.css">
<link rel="stylesheet" href="script/zTree/css/demo.css" type="text/css">
<link rel="stylesheet" href="script/zTree/css/zTreeStyle/zTreeStyle.css" type="text/css">
<link rel="stylesheet" href="script/jquery-ui-1.10.4/demos/demos.css">
<link rel="stylesheet" href="style/style.css">
<script type="text/javascript">
	var setting = {
		check : {
			enable : true
		},
		callback: {
			onCheck: zTreeOnCheck
		},
		data : {
			simpleData : {
				enable : true
			},
			key : {
				name : "name"
			}
		}
	};

	var zNodes =<%=request.getAttribute("zNodes")%>;

	var treeObj;
	
	$(function() {
		init_setPrivilege_page(setting,zNodes,treeObj,<%=(String) request.getParameter("id")%>);
	});

</script>
<style type="text/css">
ul.ztree {
	border: 0;
	margin: 0 0 0 30px;
	background-color: white;
}
a{
	margin: 5px;
}
</style>
</head>
<body>
	<div id="radio">
		<input type="radio" id="checkAll" name="radio" /><label for="checkAll">全选</label>
		<input type="radio" id="unCheckAll" name="radio" /><label for="unCheckAll">全不选</label>
		<input type="radio" id="back2original" name="radio" /><label for="back2original">还原</label>
	</div>
	<ul id="privilegeTree" class="ztree" style=" width:auto; height:auto;"></ul>
	<br/>
	<input type="button" value="提交" id="a_setPrivilege" />
	<input type="button" value="返回上一页" onclick="history.go(-1)" />
</body>
</html>
